import request from '@/utils/request'

const prePath = '/workbench'
//获取昨日使用金额
export function getAmountUsedYesterday() {
  return request({
    url: prePath + '/yesterdayConsumes',
    method: 'get',
  })
}

//获取库存金额
export function getAmountStock() {
  return request({
    url: prePath + '/storageSumPrice',
    method: 'get',
  })
}

// 证照效期状态饼图
export function getLicenseExpire() {
  return request({
    url: prePath + '/licenseExpire',
    method: 'get',
  })
}

// 产品效期状态饼图
export function getProductExpire() {
  return request({
    url: prePath + '/productExpire',
    method: 'get',
  })
}

// 库存高低水位饼图
export function getStockExpire() {
  return request({
    url: prePath + '/stockWaning',
    method: 'get',
  })
}

// 近月使用金额折线图
export function getMonthlyConsume() {
  return request({
    url: prePath + '/monthlyConsumeBar',
    method: 'get',
  })
}

//厂家营业执照预警饼图
export function getBrandBusinessLicenseExpire() {
  return request({
    url: prePath + '/brandBusinessLicense',
    method: 'get',
  })
}

//厂家医疗器械生产许可饼图
export function getBrandMedicalDeviceLicenseExpire() {
  return request({
    url: prePath + '/brandMedicalDeviceLicense',
    method: 'get',
  })
}

//厂家第一类医疗器械生产备案预警饼图
export function getBrandFirstMedicalDeviceFilingExpire() {
  return request({
    url: prePath + '/brandFirstMedicalDeviceFiling',
    method: 'get',
  })
}

//厂家生产企业卫生许可证预警饼图
export function getBrandSanitaryLicenseExpire() {
  return request({
    url: prePath + '/brandSanitaryLicense',
    method: 'get',
  })
}

// 使用金额柱状图
export function getConsumeBar(params) {
  return request({
    url: prePath + '/consumeBar',
    method: 'get',
    params,
  })
}

// 库存使用量柱状图
export function getDepotConsumeBar(params) {
  return request({
    url: prePath + '/depotConsumeBar',
    method: 'get',
    params,
  })
}
// 产品出库前十
export function topTenExportProductPrice(params) {
  return request({
    url: prePath + '/topTenExportProduct/price',
    method: 'get',
    params,
  })
}
export function topTenExportProductQty(params) {
  return request({
    url: prePath + '/topTenExportProduct/qty',
    method: 'get',
    params,
  })
}
// 消耗产品出库前十
export function topTenConsumeProductPrice(params) {
  return request({
    url: prePath + '/topTenConsumeProduct/price',
    method: 'get',
    params,
  })
}
export function topTenConsumeProductQty(params) {
  return request({
    url: prePath + '/topTenConsumeProduct/qty',
    method: 'get',
    params,
  })
}
// 部门产品出库前十
export function topTenExportDeptPrice(params) {
  return request({
    url: prePath + '/topTenExportDept/price',
    method: 'get',
    params,
  })
}
export function topTenExportDeptQty(params) {
  return request({
    url: prePath + '/topTenExportDept/qty',
    method: 'get',
    params,
  })
}

//合同效期预警饼图
export function getContractExpireExpire() {
  return request({
    url: prePath + '/contractExpireWarning',
    method: 'get',
  })
}
